<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--js遍历数组js遍历对象，js forEach js for in-->
    <script type="text/javascript">
        xxx=[{'x1':'y1'},{'x2':'y2'},]
        xxx.forEach(v=>{
            for ( k in v){
                console.log(k)
                console.log(v[k])
            }
        })
    </script>
</body>
</html>